using System.Web.UI;
using System.ComponentModel;

namespace Library.WebControls.SimpleDataView {
	[ToolboxItem(false)]
	[DesignTimeVisible(false)]
	public class SpDataViewItemTemplate : Control, IDataItemContainer {
		private readonly int _index;
		private readonly object _dataItem;
		public SpDataViewItemTemplate(object dataItem, int index) {
			_dataItem = dataItem;
			_index = index;
		}
		#region IDataItemContainer Members

		public object DataItem {
			get { return _dataItem; }
		}

		public int DataItemIndex {
			get { return _index; }
		}

		public int DisplayIndex {
			get { return _index; }
		}

		#endregion
	}
}
